package com.hujifang.elasticsearch.model;

import java.io.Serializable;
import java.util.Map;

/**
 * 搜索命中结果
 * Created by Hurricane.Hu on 2015/8/14.
 */
public class EsSearchHit implements Serializable{
    private static final long serialVersionUID = -6743429513196375442L;
    /**
     * 匹配率
     */
    private float score;
    /**
     * 所属索引
     */
    private String index;
    /**
     * 所属类型
     */
    private String type;
    /**
     *版本
     */
    private long version;
    /**
     * 索引Id
     */
    private String id;
    /**
     * 是否为空
     */
    private boolean sourceEmpty;
    /**
     * 原数据字符串
     */
    private String sourceAsString;
    /**
     * 原数据Map
     */
    private Map<String, Object> sourceAsMap;
    /**
     * 高亮字段
     */
    private Map<String, EsHighlightField> highlightFields;

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public boolean isSourceEmpty() {
        return sourceEmpty;
    }

    public void setSourceEmpty(boolean sourceEmpty) {
        this.sourceEmpty = sourceEmpty;
    }

    public String getSourceAsString() {
        return sourceAsString;
    }

    public void setSourceAsString(String sourceAsString) {
        this.sourceAsString = sourceAsString;
    }

    public Map<String, Object> getSourceAsMap() {
        return sourceAsMap;
    }

    public void setSourceAsMap(Map<String, Object> sourceAsMap) {
        this.sourceAsMap = sourceAsMap;
    }

    public Map<String, EsHighlightField> getHighlightFields() {
        return highlightFields;
    }

    public void setHighlightFields(Map<String, EsHighlightField> highlightFields) {
        this.highlightFields = highlightFields;
    }
}
